﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="GameView.xaml.cs" company="">
//   
// </copyright>
//  <summary>
//   Interaction logic for GameView.xaml
// </summary>
// --------------------------------------------------------------------------------------------------------------------
namespace Shatranj
{
    using System.Windows;

    /// <summary>
    ///     Interaction logic for GameView.xaml
    /// </summary>
    public partial class GameView : Window
    {
        #region Constructors and Destructors

        /// <summary>
        /// Initializes a new instance of the <see cref="GameView"/> class.
        /// </summary>
        public GameView()
        {
            this.InitializeComponent();

            // this.DataContext = new GameViewModel();
        }

        #endregion

        #region Methods

        /// <summary>
        /// The move button_ click.
        /// </summary>
        /// <param name="sender">
        /// The sender.
        /// </param>
        /// <param name="e">
        /// The e.
        /// </param>
        private void MoveButton_Click(object sender, RoutedEventArgs e)
        {
            var context = this.DataContext as GameViewModel;
            if (context == null)
            {
                return;
            }

            context.CurrentGame.Board.MakeMove("a2", "a4");
        }

        #endregion
    }
}